package work;

// 老虎类
public class Tiger extends Mammal {
    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getStripeColor() {
        return stripeColor;
    }

    public void setStripeColor(String stripeColor) {
        this.stripeColor = stripeColor;
    }

    private double weight;
    private int age;
    private String stripeColor;

    public Tiger(){

    }

    public Tiger(String name, double weight, int age, String stripeColor) {
        super(name);
        this.weight = weight;
        this.age = age;
        this.stripeColor = stripeColor;
    }

    @Override
    public void displayDetails() {
        super.displayDetails();
        System.out.println(name);
        System.out.println("体重：" + weight + "kg");
        System.out.println("年龄：" + age + "岁");
        System.out.println("斑纹颜色：" + stripeColor);
    }

    @Override
    public void makeSound(){
        System.out.println("老虎咆哮");
    }
}

